/*
 * Barang.java
 *
 * Created on September 15, 2006, 7:25 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package com.org.kasir.model;

import java.io.Serializable;
import java.util.ArrayList;

/**
 *
 * @author City_Z
 */
public class Barang implements Serializable {

    private String kode;
    private String nama;
    private Double harga;
    private int stock;
    private ArrayList<Barang> orderItem = new ArrayList<Barang>();

    /** Creates a new instance of Barang */
    public Barang() {
    }

    public Barang(String kode, String nama, Double harga, int stock) {
        this.kode = kode;
        this.nama = nama;
        this.harga = harga;
        this.stock = stock;
    }

    public void setKode(String kode) {
        this.kode = kode;
    }

    public String getKode() {
        return kode;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }

    public String getNama() {
        return nama;
    }

    public void setHarga(Double harga) {
        this.harga = harga;
    }

    public Double getHarga() {
        return harga;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }

    public int getStock() {
        return stock;
    }

    public void getOrderItem(ArrayList<Barang> orderItem) {
        this.orderItem = orderItem;
    }

    public ArrayList<Barang> getOrderItem() {
        return orderItem;
    }

    public Double getTotal(Double c, Double d) {
        return c * d;
    }

    public int getJum(int a, int b) {
        return a - b;
    }
}
